package com.intertid.mongodb.test
import com.intertid.mongodb.annotations.Entity
import scala.reflect.BeanProperty
import org.bson.types.ObjectId
import com.intertid.mongodb.annotations.ID
import com.intertid.mongodb.annotations.Ref

@Entity
class User {
  @BeanProperty
  @ID
  var id: ObjectId = _;
  @BeanProperty
  var username: String = _;
  @BeanProperty
  var password: String = _;

  @BeanProperty
  @Ref(cascadeDelete = true)
  var dept: Dept = _;

  @BeanProperty
  @Ref(cascadeDelete = true)
  var roles: List[Role] = _;
  

}